package cn.school.service;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import cn.school.dao.GradeDao;
import cn.school.entity.Grade;
import cn.school.util.MyBatisUtil;

public class Service2 {
	public List<Grade> getSubInfo() {
		SqlSession session = MyBatisUtil.getSqlsession();
		try {
			GradeDao gradeDao = session.getMapper(GradeDao.class);
			return (List<Grade>) gradeDao.getSubInfo();
		} finally {
			MyBatisUtil.getclose(session);
		}
	}

	public java.util.List<Grade> findALL() {

		SqlSession session = MyBatisUtil.getSqlsession();
		try {
			GradeDao studentDao = session.getMapper(GradeDao.class);
			return studentDao.findALL();
		} finally {
			MyBatisUtil.getclose(session);

		}

	}
}
